<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>倒计时插件-Jquery插件库-林氏智造</title>
		<link href="css/reset.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<link href="css/ui.css" rel="stylesheet" />
		<link href="css/shCoreDefault.css" rel="stylesheet" />
		<script type="text/javascript" src="js/jquery-1.10.0.min.js"></script>
		<script type="text/javascript" src="js/shCore.js"></script>
		<script type="text/javascript" src="js/shBrushCSharp.js"></script>
		<script type="text/javascript">SyntaxHighlighter.all();</script>
		<script type="text/javascript" src="js/lin_countdown.1.0.js"></script>
		<script type="text/javascript">
			$(function(){
				$(".lin_showTime").lin_countdown({callBackFunction:function(element,msg){
					msg.html("时间到").show();
				}});
			});
		</script>
	</head>
	<body id="main">
		
		<div class="slidebar">
			<a href="http://www.0773linji.com" title="林氏智造" class="logo">林氏智造</a>
			<div class="slidebar_title">Jquery<span class="ver">插件库</span></div>
			<iframe src="../menu.html" frameborder="0"></iframe>
		</div>
		
		<div class="content">
			
			<div class="caption"><h2>倒计时插件</h2><span class="file">Define in : lin_countdown.1.0.js</span></div>
			
			<div class="mod_desc">
        			<p>和时间有关的插件总会用到clearInterval定时器，设定每1秒的执行函数，实时更新相关HTML里面的值，在倒计时结束后执行相应的回调函数。</p>
    			</div>
    			
    			<h3 class="title_lv2">
    				$("<span>target</span>").lin_countdown([ <em>options</em> ]);
    			</h3>
    			
    			<dl class="deps">
        			<dt>依赖</dt>
        			<dd>JS : jquery-1.10.0.min.js</dd>
        			<dd>浏览器 : ie7+</dd>
    			</dl>
    			
    			<div class="params_box">
				<h5>参数</h5>
				<ul class="params_list">
					<li>
						<dl>
							<dt>target</dt>
							<dd>String</dd>
						</dl>
						<div class="params_desc">
							<span class="type required">必需</span>
							<p>target DOM元素ID或者DOM元素class,对匹配元素进行插件绑定。</p>
						</div>
					</li>
					<li>
						<dl>
							<dt>options</dt>
							<dd>Object</dd>
						</dl>
						<div class="params_desc">
							<span class="type optional">可选</span>
							<p>多选形式的可配置参数。</p>
						</div>
					</li>
				</ul>
			</div>
			
			<div class="article_box">
        			<p>下表列出了options参数介绍。</p>
    			</div>
    			
    			<table class="props_tb">
        <colgroup>
            <col style="width:130px">
            <col style="width:100px">
            <col style="width:70px">
            <col style="width:370px">
        </colgroup>
        <thead>
            <tr class="even">
                <th>参数</th>
                <th>数据类型</th>
                <th>默认值</th>
                <th>说明</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><b class="name">mainSeconds</b></td>
                <td><span class="type">String</span></td>
                <td><span class="normal">.lin_remainSeconds</span></td>
                <td class="t_l">
                    <p>剩余时间获取对象样式</p>
                </td>
            </tr>
            <tr class="even">
                <td><b class="name">mainTimeShow</b></td>
                <td><span class="type">String</span></td>
                <td><span class="normal">.lin_remainTime</span></td>
                <td class="t_l">
                    <p>时间显示区域对象</p>
                </td>
            </tr>
            <tr>
                <td><b class="name">message</b></td>
                <td><span class="type">String</span></td>
                <td><span class="normal">.lin_message</span></td>
                <td class="t_l">
                    <p>时间结束后的信息显示对象</p>
                </td>
            </tr>
            <tr class="even">
                <td><b class="name">callBackFunction</b></td>
                <td><span class="type">Function</span></td>
                <td><span class="normal">''</span></td>
                <td class="t_l">
                    <p>回调函数 function(element,msg){}</p>
                    <p><b>element</b> 当前对象</p>
                    <p><b>msg</b> 当前消息对象</p>
                </td>
            </tr>
        </tbody>
    </table>
    
    
    <div class="example_box">
        <h5>例子一：基本调用</h5>
        <p>HTML</p>
        <div class="code_box">
        		<pre class="brush: csharp;"><div> 
<div class="lin_timeBack"> 
  <div class="lin_remainSeconds" style="display:none">259200</div><!-- 距离结束还差多少秒-->
  <div class="lin_remainTime">
     <span class="day">00</span>
     <span class="hour">00</span>
     <span class="mini">00</span>
     <span class="sec">00</span>
   </div>
</div>
<div class="lin_message"></div>                 
</div></pre>
        </div>
		<p>CSS</p>    
        <div class="code_box">
        		<pre class="brush: csharp;">.lin_showTime{width:198px; overflow:hidden; margin-bottom:10px;}
.lin_timeBack{ height:70px;width:198px;text-align:left;background: url(time.gif) left -8px no-repeat;overflow:hidden;}
.lin_remainTime .day,.lin_remainTime .hour,.lin_remainTime .mini,.lin_remainTime .sec{width:37px;height:47px;display:block;float:left;font-size:26px;font-family:Helvetica,arial,sans-serif;line-height:46px;text-align:center;/*color:#E11D1D*/color:#444;font-weight:400}
.lin_remainTime .day{padding-left:12px}
.lin_remainTime .hour{padding-left:13px}
.lin_remainTime .mini{padding-left:8px}
.lin_remainTime .sec{padding-left:8px} 
.lin_message{padding:5px; background-color:#FEE0E7; text-align:center;width:198px; display:none;}</pre>
        </div>        
		<p>JS</p>    
        <div class="code_box">
        		<pre class="brush: csharp;">$(".lin_showTime").lin_countdown({callBackFunction:function(element,msg){
	msg.html("时间到").show();
}});</pre>
        </div>        
        
        <div class="demo_box">
            
            <div class="lin_showTime"> 
   									<div class="lin_timeBack"> 
     									<div class="lin_remainSeconds" style="display:none">259200</div><!-- 距离结束还差多少秒-->
	 									<div class="lin_remainTime">
           									<span class="day">00</span>
           									<span class="hour">00</span>
           									<span class="mini">00</span>
           									<span class="sec">00</span>
	 									</div>
  									</div>
                					<div class="lin_message"></div>                 
								</div>

								<div class="lin_showTime"> 
   									<div class="lin_timeBack"> 
     									<div class="lin_remainSeconds" style="display:none">4</div><!-- 距离结束还差多少秒-->
	 									<div class="lin_remainTime">
           									<span class="day">00</span>
           									<span class="hour">00</span>
           									<span class="mini">00</span>
           									<span class="sec">00</span>
	 									</div>
  									</div>
                					<div class="lin_message"></div>                 
								</div>
            
        </div>
        
    </div>
    
    
    <div class="download">
        <h3>立即下载</h3>
        <div class="download_box">
            <a href="#" target="_blank" class="btn_download btn_download_wide">
                <span class="icon_box"><s class="icon_download"></s></span>
                <span class="title">lin_countdown</span>
                <span class="version">version : 1.0</span>
            </a>
        </div>
    </div>
    
    <div class="download">
        <h3>联系我</h3>
        <div class="download_box">
           <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=317365887&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:317365887:53" alt="请注明通过林氏智造发现此QQ" title="请注明通过林氏智造发现此QQ"/></a>
        </div>
    </div>
			
			
		</div>
		
	</body>
</html>
